-
Notifications
You must be signed in to change notification settings - Fork 421
fix(docs): clarified usage of validation with fine grained responses #4101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @rubenfonseca! I've made a small suggestion to make the message more "active voice".
Co-authored-by: Leandro Damascena <[email protected]> Signed-off-by: Ruben Fonseca <[email protected]>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
APPROVED!
Issue number: #4085
Summary
This pull request updates the documentation to clarify the usage of
Response
with data validation in the Event Handler utility.Changes
Response
when using data validation.Response[Todo]
to avoid validation errors.User experience
Before this change:
Unable to generate pydantic-core schema for <class 'aws_lambda_powertools.event_handler.api_gateway.Response'>
when usingResponse
with data validation without specifying the concrete type.Response
with data validation.After this change:
Response
with data validation by specifying the concrete type, such asResponse[Model]
.Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.